﻿@using Kevin.Shop.Business.Service.Entity.Helper
@{
    ViewBag.Title = "商品分类";
 
}
@{ Html.RenderAction("SearchPartial", "Home"); }   
<div class="p10">
    <ul data-role="listview">
    <li data-theme="none" data-icon="false">
        <div data-role="collapsible-set">
            @if (WebClientContext.Current.CategorySwitch == WebClientContext.StrGroup)
            {
                foreach (var item in Model)
                { 
                   <div data-role="collapsible" >
                    <h2>@item.CategoryName</h2>
                       <ul data-role="listview">
                           @foreach (var subitem in item.CategoryList)
                           { 
                               <li><a  href="~/Sort/SubCategoryList?id=@subitem.CategoryId">@subitem.CategoryName</a></li>
                           }
                       </ul>
                  </div>
                }
       
            }
            else
            {
                foreach (var item in Model)
                { 
                <div data-role="collapsible" >
                    <h2>@item.CategoryName</h2>
                    <ul data-role="listview">
                        <li><a  href="~/Product/ProductList?sid=@item.CategoryId">所有产品</a></li>
                        @foreach (var subitem in item.CategoryList)
                        { 
                            <li><a  href="~/Product/ProductList?sid=@subitem.CategoryId">@subitem.CategoryName</a></li>
                        }
                    </ul>
                </div>
                }
            }
        </div>
    </li>
</ul>
</div>
